package com.cn.chen.controller;

import java.nio.file.attribute.UserPrincipalLookupService;
import java.util.HashMap;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.cn.chen.service.UserService;

@Controller
@RequestMapping("/chen")
public class UserController {

	@Autowired
	private UserService userService;
	@RequestMapping("/getUser")
	@ResponseBody
	public Map<String, Object> getUser()
	{
		Map<String, Object> map=new HashMap<String, Object>();
		map.put("user", userService.getUser());
		return map;
	}
}
